const globalUrls = {
  // 电影
  movieList: "https://m.douban.com/rexxar/api/v2/subject_collection/movie_showing/items",
  tvList: 'https://m.douban.com/rexxar/api/v2/subject_collection/tv_hot/items',
  // 综艺
  showList: 'https://m.douban.com/rexxar/api/v2/subject_collection/tv_variety_show/items',
  // 详情页面对应的数据接口
  movieDetail: "https://m.douban.com/rexxar/api/v2/movie/",
  tvDetail: "https://m.douban.com/rexxar/api/v2/tv/",
  showDetail: "https://m.douban.com/rexxar/api/v2/tv/",
  // 详情页面标签接口
  movieTags: function(id) {
    return "https://m.douban.com/rexxar/api/v2/movie/" + id + "/tags?count=8"
  },
  tvTags: function(id) {
    return "https://m.douban.com/rexxar/api/v2/tv/" + id + "/tags?count=8"
  },
  showTags: function(id) {
    return this.tvTags(id);
  },
  // 查看更多短评
  movieComments(id, start, count) { //接收三个参数,id,从第几条短评开始,显示几条
    return 'https://m.douban.com/rexxar/api/v2/movie/' + id + '/interests?count=' + count + '&start=' + start;

  },
  tvComments: function(id, start = 0, count = 3) {
    return 'https://m.douban.com/rexxar/api/v2/tv/' + id + '/interests?count=' + count + '&start=' + start;
  },
  showComments: function(id, start = 0, count = 3) {
    return this.tvComments(id, start, count);
  },
  // 搜索接口
  searchUrl: function (q) {
    return "https://m.douban.com/rexxar/api/v2/search?type=movie&q=" + q
  }
}
export {
  globalUrls
} //导出